//
//  SendEmailSuccessView.m
//  Bespoke
//
//  Created by Cheng on 12/11/8.
//
//

#import "SendEmailSuccessView.h"

#define LEFT_SPACE 10
#define RIGHT_SPACE 10
#define BORDER_HEIGHT 20

@implementation SendEmailSuccessView
@synthesize SVw_Email, delegate;

-(IBAction)ClosePressed:(id)sender {
    [self.delegate DidCloseView_SendEmailSuccessView];
}

- (void)InitEmailArray:(NSMutableArray *)EmailArray {
    
    int AXIS_Y = 0;
    
    //Remove Older UIlabel.
    for (UIView *Older_Email in self.SVw_Email.subviews)
        [Older_Email removeFromSuperview];
    
    
    for (NSString *NS_Email in EmailArray) {
                
        UILabel *Lab_Email = [[UILabel alloc] initWithFrame:CGRectMake(LEFT_SPACE, AXIS_Y, self.SVw_Email.frame.size.width-LEFT_SPACE-RIGHT_SPACE, BORDER_HEIGHT)];
        Lab_Email.backgroundColor = [UIColor clearColor];
        Lab_Email.font = [UIFont fontWithName:@"Helvetica" size:15];
        Lab_Email.text = NS_Email;
        
        [self.SVw_Email addSubview:Lab_Email];
        
        AXIS_Y = AXIS_Y + BORDER_HEIGHT;
    }
}

@end
